package com.javafactroy.kunlong.test;

import com.javafactroy.kunlong.DbagentApp;
import com.javafactroy.kunlong.base.model.ApiPageInfo;
import com.javafactroy.kunlong.dxp.common.utils.CommonUtils;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestMethodOrder;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;

import java.util.List;
import com.javafactroy.kunlong.data.entity.TSysUserApiEntity;
import com.javafactroy.kunlong.data.service.TSysUserService;
/**
*  @author raymond.lei@163.com
*  @date   2023-11-02 21:29:03

*/

@SpringBootTest(classes = {DbagentApp.class}, webEnvironment = SpringBootTest.WebEnvironment.NONE)
@ExtendWith(SpringExtension.class)
@Slf4j
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@TestMethodOrder(MethodOrderer.MethodName.class)

public class TSysUserTestService {
    @Autowired
    TSysUserService service;

    @Test
    public void test001_query() {
        ApiPageInfo<TSysUserApiEntity> entity = service.query(new TSysUserApiEntity());

        log.info("entity = {}", CommonUtils.toJSONString(entity));

    }

    @Test
    public void test002_selectByPkey() {
        TSysUserApiEntity entity = service.selectByPkey(1l);
        log.info("entity = {}", entity);

    }

    @Test
    public void test003_save() {
        TSysUserApiEntity entity = new TSysUserApiEntity();
        //service.save(entity.setShopName("122").setContact("ddl"));
        log.info("entity = {}", entity);

    }
}

